package stone.ast;

import java.util.List;

import ASTInterpreter.Environment;

public class ArrayLiteral extends ASTList {

	public ArrayLiteral(List<ASTree> list) {
		super(list);
	}
	
	public int size() {
		return numChildren();
	}
	
	public Object eval(Environment env) {
		int num = numChildren();
		Object[] res = new Object[num];
		int i = 0;
		for(ASTree t : this) {
			res[i++] = t.eval(env);
		}
		return res;
	}

}
